﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="qlconsulting.ascx.cs" Inherits="admin_qlconsulting" %>
<center>
<table width="100%">
    <tr>
        <td>Miêu tả: </td>
        <td>
            <asp:TextBox ID="des" runat="server" Height="60px" Width="344px" 
                TextMode="MultiLine"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td colspan="2"><center><asp:Button runat="server" ID="addbt" Text="Thêm" 
                onclick="addbt_Click"/></center></td>
    </tr>
</table>
</center>
<br />

<asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
    AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
    DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" 
    onrowcommand="GridView1_RowCommand" onrowcreated="GridView1_RowCreated" 
    onrowediting="GridView1_RowEditing" PageSize="5" Width="100%" 
    onrowdeleting="GridView1_RowDeleting" EnableModelValidation="True" 
    DataKeyNames="id">
    <RowStyle BackColor="#EFF3FB" VerticalAlign="Middle" />
    <EmptyDataRowStyle VerticalAlign="Middle" />
    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="White" ForeColor="#459300" HorizontalAlign="Center" />
    <EmptyDataTemplate>
        <asp:Label ID="Label3" runat="server" Text="Chưa có dữ liệu"></asp:Label>
    </EmptyDataTemplate>
    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
    <HeaderStyle BackColor="#57A000" Font-Bold="True" ForeColor="White" />
    <Columns>
        <asp:TemplateField HeaderText="id" SortExpression="id" Visible="False">
            <EditItemTemplate>
                <asp:Label ID="id" runat="server" Text='<%# Eval("id") %>'></asp:Label>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="id" runat="server" Text='<%# Bind("id") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="description" HeaderText="Miêu tả" SortExpression="description" 
            ItemStyle-HorizontalAlign="Center">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
        </asp:BoundField>
        <asp:CommandField ButtonType="Button" EditText="Sửa" ShowEditButton="True" 
            ItemStyle-HorizontalAlign="Center">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
        </asp:CommandField>
        <asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:Button ID="Button1" runat="server" CausesValidation="true" 
                        CommandName="Delete" Text="Xoá" OnClientClick="return confirm('Bạn thật sự muốn xóa dữ liệu này?')" />
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
        <asp:ButtonField ButtonType="Button" CommandName="addLang" Text="Ngôn ngữ" 
            ItemStyle-HorizontalAlign="Center">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
        </asp:ButtonField>
        <asp:ButtonField ButtonType="Button" Text="Chi tiết" 
            ItemStyle-HorizontalAlign="Center" CommandName="det">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
        </asp:ButtonField>
    </Columns>
    <EditRowStyle BackColor="#003366" VerticalAlign="Middle" />
    <AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:canhbuomxanhconnectionstring %>" 
    SelectCommand="SELECT * FROM [Consulting]"></asp:SqlDataSource>
